package com.company.project.service.impl;

import com.company.project.common.utils.ExcelUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.company.project.mapper.MGoodsMapper;
import com.company.project.entity.MGoodsEntity;
import com.company.project.service.MGoodsService;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


@Service("mGoodsService")
public class MGoodsServiceImpl extends ServiceImpl<MGoodsMapper, MGoodsEntity> implements MGoodsService {


    @Override
    public void importGoods(MultipartFile file) {
        List<MGoodsEntity> mGoodsEntities = ExcelUtils.importExcel(file, 0, 1, MGoodsEntity.class);
        System.out.println(mGoodsEntities.toArray());
    }
}